<!DOCTYPE >
<html>
{include file="head.html"}
<body>
{include file='article/nav.html'}

<div class="main-body w98">

<div class="search-form">
<form method="get" action="{$appadmin}">
<input type="hidden" name="m" value="article" />

ID:<input type="text" name="id" value="{$smarty.get.id|intval}" class="w50" />
状态：<select name="bstatus" class="w100">
	<option value="0">选择</option>
	<option value="1" {if get('bstatus') eq 1 }selected="selected"{/if}>未审核</option>
    <option value="2" {if get('bstatus') eq 2 }selected="selected"{/if}>已审核</option>
    <option value="10" {if get('bstatus') eq 10 }selected="selected"{/if}>已禁止</option>
</select>
分类：    <select name="catid" class="w100">
    <option value="0">请选择</option>
    {foreach item=c from=$cat_list}
                <option value="{$c.catid}" {if get('catid') eq $c.catid} selected="selected"{/if}>{$c.cname}</option>
                {foreach item=c_2 from=$c.child}
                	<option value="{$c_2.catid}" {if get('catid') eq $c_2.catid} selected="selected"{/if} class="o_c_2">|__{$c_2.cname}</option>
                    {foreach item=c_3 from=$c_2.child}
                    <option value="{$c_3.catid}" {if get('catid') eq $c_3.catid} selected="selected"{/if} class="o_c_3"> |____{$c_3.cname}</option>
                    	{foreach item=c4 from=$c_3.child}
                        	<option value="{$c4.catid}" {if get('catid') eq $c4.catid} selected="selected"{/if} class="o_c_3"> |_____{$c4.cname}</option>
                        {/foreach}
                    {/foreach}
                {/foreach}
                {/foreach}
    </select>
主题：<input type="text" name="title" value="{$smarty.get.title}" class="w200" />
推荐：<select name="s_recommend" class="w100">
<option value="0">请选择</option>
<option value="1" {if get('s_recommend') eq 1} selected="selected"{/if}>是</option>
<option value="2" {if get('s_recommend') eq 2} selected="selected"{/if}>否</option>
</select>
<br>
最新：<select name="s_new" class="w100">
<option value="0">请选择</option>
<option value="1" {if get('s_new') eq 1} selected="selected"{/if}>是</option>
<option value="2" {if get('s_new') eq 2} selected="selected"{/if}>否</option>
</select>

热门：<select name="s_hot" class="w100">
<option value="0">请选择</option>
<option value="1" {if get('s_hot') eq 1} selected="selected"{/if}>是</option>
<option value="2" {if get('s_hot') eq 2} selected="selected"{/if}>否</option>
</select>
图片：<select name="s_is_img" class="w100">
<option value="0">请选择</option>
<option value="1" {if get('s_is_img') eq 1} selected="selected"{/if}>有</option>
<option value="2" {if get('s_is_img') eq 2} selected="selected"{/if}>无</option>
</select>
<input type="submit" value="搜索" class="btn" />
</form>
</div>
 <table class="table table-bordered" width="100%">
  <tr>
   <td>id</td>
   <td>标题</td>
   <td>分类</td>
   
 
   <td>发布时间</td>
  
   <td>封面</td>
     <td>状态</td>
   
   <td>推荐</td>
   <td>最新</td>
   <td>最热</td>
   <td>访问数</td>
   <td>产品价格</td>
   <td>市场价格</td>
   <td>库存数</td>
   <td>销售数</td>
   
<td>操作</td>
  </tr>
 {foreach item=c from=$data}
<tr>
   <td>{$c.id}</td>
   <td>{$c.title}</td>
   <td>{$c.cname} </td>
   
  
   <td>{$c.dateline|date:Y-m-d}</td>
    
   <td>{if $c.is_img}<img src="{$c.imgurl|images_site}.100x100.jpg" width="50">{/if}</td>
 
   <td align="center"> 
    {if $c.bstatus eq 2}
   <img src='{$skins}images/yes.gif' class="ajax_no" url='{$appadmin}?m=article&a=bstatus&id={$c.id}&bstatus=10' rurl='{$appadmin}?m=article&a=bstatus&id={$c.id}&bstatus=2'>
    {else}
    <img src='{$skins}images/no.gif' class="ajax_yes" url='{$appadmin}?m=article&a=bstatus&id={$c.id}&bstatus=2' rurl='{$appadmin}?m=article&a=bstatus&id={$c.id}&bstatus=10'>
    {/if}</td>
    <td>{if $c.is_recommend eq 1}
   <img src='{$skins}images/yes.gif' class="ajax_no" url='{$appadmin}?m=article&a=recommend&id={$c.id}&is_recommend=0' rurl='{$appadmin}?m=article&a=recommend&id={$c.id}&is_recommend=2'>
    {else}
    <img src='{$skins}images/no.gif' class="ajax_yes" url='{$appadmin}?m=article&a=recommend&id={$c.id}&is_recommend=1' rurl='{$appadmin}?m=article&a=recommend&id={$c.id}&is_recommend=0'>
    {/if}</td>
    
    <td>{if $c.isnew eq 1}
   <img src='{$skins}images/yes.gif' class="ajax_no" url='{$appadmin}?m=article&a=new&id={$c.id}&isnew=0' rurl='{$appadmin}?m=article&a=new&id={$c.id}&isnew=1'>
    {else}
    <img src='{$skins}images/no.gif' class="ajax_yes" url='{$appadmin}?m=article&a=new&id={$c.id}&isnew=1' rurl='{$appadmin}?m=article&a=new&id={$c.id}&isnew=0'>
    {/if}</td>
    <td>{if $c.ishot eq 1}
   <img src='{$skins}images/yes.gif' class="ajax_no" url='{$appadmin}?m=article&a=hot&id={$c.id}&ishot=0' rurl='{$appadmin}?m=article&a=hot&id={$c.id}&ishot=1'>
    {else}
    <img src='{$skins}images/no.gif' class="ajax_yes" url='{$appadmin}?m=article&a=hot&id={$c.id}&ishot=1' rurl='{$appadmin}?m=article&a=hot&id={$c.id}&ishot=0'>
    {/if}</td>
   <td>{$c.view_num}</td>
   <td>{$c.price}</td>
   <td>{$c.market_price}</td>
   <td>{$c.total_num}</td>
   <td>{$c.sold_num}</td>
  
<td><a href="{$appadmin}?m=article&a=add&id={$c.id}">编辑</a>  &nbsp;
<a href="/index.php?m=article&a=show&id={$c.id}" target="_blank">查看</a>  &nbsp;
<a href="javascript:;" class="delete" url="{$appadmin}?m=article&a=delete&id={$c.id}">删除</a> &nbsp;
</td>
  </tr>
   {/foreach}
 </table>
<div>{$pagelist}</div>
</div> 
{include file="footer.html"}
</body>
</html>